package com.ry.jwtexp.result;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * @Author ry
 * @Description
 * @Date 2020/9/1 11:19
 */
@Data
@ToString
@EqualsAndHashCode
@Accessors(chain = true)
public class AjaxResult {
    private boolean success;

    private String message;

    private Object data;

    private Integer code;

    public AjaxResult(boolean success) {
        this(success, null, null);
    }

    public AjaxResult(boolean success, String message) {
        this(success, message, null);
    }

    public AjaxResult(boolean success, String message, Object data) {
        this.success = success;
        this.message = message;
        this.data = data;
    }
}
